package com.easyOrder.core.context;

import java.io.Serializable;
import java.util.Date;
import java.util.HashMap;

public class WebSession implements Serializable {
	private static final long serialVersionUID = 1L;

	/**
	 * 会话ID
	 */
	private String id;

	/**
	 * 会话的开始时间
	 */
	private Date startTime;

	/**
	 * 租户ID
	 */
	private Long tenantId;

	/**
	 * 租户名称
	 */
	private String tenantName;

	/**
	 * 用户ID
	 */
	private Long userId;

	/**
	 * 用户名称
	 */
	private String userName;

	/**
	 * 人员ID
	 */
	private Long employeeId;

	/**
	 * 人员名称
	 */
	private String employeeName;

	/**
	 * 分支组织ID（为0表示本部）
	 */
	private Long branchId;

	/**
	 * 分支组织名称
	 */
	private String branchName;

	/**
	 * 分支组织类型（0本部,1分子公司,2门店）
	 */
	private Integer branchTypeId;

	/**
	 * 部门ID
	 */
	private Long departmentId;

	/**
	 * 部门名称
	 */
	private String departmentName;

	/**
	 * 客户端类型ID
	 */
	private Integer clientTypeId;

	/**
	 * 客户端
	 */
	private String client;

	/**
	 * 应用键
	 */
	private String appKey;

	/**
	 * 应用密钥
	 */
	private String secretKey;

	/**
	 * 数据范围类型ID（1所属部门,2所属公司/门店,3指定公司/门店,4所有公司/门店）")
	 */
	private Integer dataScopeTypeId;

	/**
	 * 数据范围
	 */
	private String dataScope;

	/**
	 * 设备ID号
	 */
	private String deviceId;
	
	/**
	 * 手机号码
	 */
	private String mobile;

	/**
	 * 用户Code
	 */
	private String userCode;

	/**
	 * 是否是总部人员
	 */
	private Boolean isHeadQuartersUser;

	/**
	 * 顶级总部部门ID
	 */
	private Long topHeadDepartmentId;

	private Long provinceId;

	private String provinceName;

	private Long cityId;

	private String cityName;

	private Boolean branchManager = Boolean.FALSE;

	private Boolean tenantManager = Boolean.FALSE;

	public String getUserCode() {
		return userCode;
	}

	public void setUserCode(String userCode) {
		this.userCode = userCode;
	}

	public Boolean getBranchManager() {
		return branchManager;
	}

	public void setBranchManager(Boolean branchManager) {
		this.branchManager = branchManager;
	}

	public boolean isFirstLogin() {
		return firstLogin;
	}

	public Boolean getTenantManager() {
		return tenantManager;
	}

	public void setTenantManager(Boolean tenantManager) {
		this.tenantManager = tenantManager;
	}

	public Long getProvinceId() {
		return provinceId;
	}

	public void setProvinceId(Long provinceId) {
		this.provinceId = provinceId;
	}

	public String getProvinceName() {
		return provinceName;
	}

	public void setProvinceName(String provinceName) {
		this.provinceName = provinceName;
	}

	public Long getCityId() {
		return cityId;
	}

	public void setCityId(Long cityId) {
		this.cityId = cityId;
	}

	public String getCityName() {
		return cityName;
	}

	public void setCityName(String cityName) {
		this.cityName = cityName;
	}

	public boolean getFirstLogin() {
		return firstLogin;
	}

	public void setFirstLogin(boolean firstLogin) {
		this.firstLogin = firstLogin;
	}

	private boolean firstLogin;

	/**
	 * 顶级总部部门名称
	 */
	private String topHeadDepartmentName;

	public Long getTopHeadDepartmentId() {
		return topHeadDepartmentId;
	}

	public void setTopHeadDepartmentId(Long topHeadDepartmentId) {
		this.topHeadDepartmentId = topHeadDepartmentId;
	}

	public String getTopHeadDepartmentName() {
		return topHeadDepartmentName;
	}

	public void setTopHeadDepartmentName(String topHeadDepartmentName) {
		this.topHeadDepartmentName = topHeadDepartmentName;
	}

	public Boolean getHeadQuartersUser() {
		return isHeadQuartersUser;
	}

	public void setHeadQuartersUser(Boolean heardQuartersUser) {
		isHeadQuartersUser = heardQuartersUser;
	}

	public boolean isSuperUser() {
		return isSuperUser;
	}

	public void setSuperUser(boolean superUser) {
		isSuperUser = superUser;
	}

	public static long getSerialVersionUID() {
		return serialVersionUID;
	}

	private boolean isSuperUser;

	public boolean getIsSuperUser() {
		return isSuperUser;
	}

	public void setIsSuperUser(boolean isSuperUser) {
		this.isSuperUser = isSuperUser;
	}

	/**
	 * 会话的特性集合
	 */
	private HashMap<String, Object> attributes;

	/**
	 * @return the deviceId
	 */
	public String getDeviceId() {
		return deviceId;
	}

	/**
	 * @param deviceId
	 *            the deviceId to set
	 */
	public void setDeviceId(String deviceId) {
		this.deviceId = deviceId;
	}
	
	/**
	 * @return the mobile
	 */
	public String getMobile() {
		return mobile;
	}

	/**
	 * @param mobile the mobile to set
	 */
	public void setMobile(String mobile) {
		this.mobile = mobile;
	}

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public Date getStartTime() {
		return startTime;
	}

	public void setStartTime(Date startTime) {
		this.startTime = startTime;
	}

	public String getUserName() {
		return userName;
	}

	public void setUserName(String userName) {
		this.userName = userName;
	}

	public String getBranchName() {
		return branchName;
	}

	public void setBranchName(String branchName) {
		this.branchName = branchName;
	}

	public String getDepartmentName() {
		return departmentName;
	}

	public void setDepartmentName(String departmentName) {
		this.departmentName = departmentName;
	}

	public Integer getClientTypeId() {
		return clientTypeId;
	}

	public void setClientTypeId(Integer clientTypeId) {
		this.clientTypeId = clientTypeId;
	}

	public String getClient() {
		return client;
	}

	public void setClient(String client) {
		this.client = client;
	}

	public Integer getBranchTypeId() {
		return branchTypeId;
	}

	public void setBranchTypeId(Integer branchTypeId) {
		this.branchTypeId = branchTypeId;
	}

	public String getAppKey() {
		return appKey;
	}

	public void setAppKey(String appKey) {
		this.appKey = appKey;
	}

	public String getSecretKey() {
		return secretKey;
	}

	public void setSecretKey(String secretKey) {
		this.secretKey = secretKey;
	}

	public Integer getDataScopeTypeId() {
		return dataScopeTypeId;
	}

	public void setDataScopeTypeId(Integer dataScopeTypeId) {
		this.dataScopeTypeId = dataScopeTypeId;
	}

	public String getDataScope() {
		return dataScope;
	}

	public void setDataScope(String dataScope) {
		this.dataScope = dataScope;
	}

	public HashMap<String, Object> getAttributes() {
		return attributes;
	}

	public void setAttributes(HashMap<String, Object> attributes) {
		this.attributes = attributes;
	}

	public Long getTenantId() {
		return tenantId;
	}

	public void setTenantId(Long tenantId) {
		this.tenantId = tenantId;
	}

	public Long getUserId() {
		return userId;
	}

	public void setUserId(Long userId) {
		this.userId = userId;
	}

	public Long getBranchId() {
		return branchId;
	}

	public void setBranchId(Long branchId) {
		this.branchId = branchId;
	}

	public Long getDepartmentId() {
		return departmentId;
	}

	public void setDepartmentId(Long departmentId) {
		this.departmentId = departmentId;
	}

	public static long getSerialversionuid() {
		return serialVersionUID;
	}

	public Long getEmployeeId() {
		return employeeId;
	}

	public void setEmployeeId(Long employeeId) {
		this.employeeId = employeeId;
	}

	public String getEmployeeName() {
		return employeeName;
	}

	public void setEmployeeName(String employeeName) {
		this.employeeName = employeeName;
	}

	public String getTenantName() {
		return tenantName;
	}

	public void setTenantName(String tenantName) {
		this.tenantName = tenantName;
	}

	@Override
	public String toString() {
		return "WebSession [id=" + id + ", startTime=" + startTime
				+ ", tenantId=" + tenantId + ", userId=" + userId
				+ ", userName=" + userName + ", branchId=" + branchId
				+ ", branchName=" + branchName + ", branchTypeId="
				+ branchTypeId + ", departmentId=" + departmentId
				+ ", departmentName=" + departmentName + ", clientTypeId="
				+ clientTypeId + ", client=" + client + ", appKey=" + appKey
				+ ", secretKey=" + secretKey + ", dataScopeTypeId="
				+ dataScopeTypeId + ", dataScope=" + dataScope
				+ ", attributes=" + attributes + "]";
	}
}
